//
//  XMTool.h
//  Fireball
//
//  Created by 俞渊华 on 2017/12/2.
//  Copyright © 2017年 俞渊华. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UMSocialCore/UMSocialCore.h>
#import "LoginViewControllerBall.h"
#import "ACAlertController.h"

typedef void(^LoginSuccessBlock)(BOOL success);

@interface XMTool : NSObject<UIImagePickerControllerDelegate,UINavigationControllerDelegate>

+(XMTool *)shared;

///设备名称
@property (strong, nonatomic, readonly) NSString *machineModelName;
///设备唯一标识符
@property (strong, nonatomic, readonly) NSString *deviceId;
///运营商名称
@property (strong, nonatomic, readonly) NSString *carrierName;

-(void)shareToPlatform:(UMSocialPlatformType)platformType viewController:(UIViewController *)viewController;
-(void)login:(UIViewController *)viewController loginBlock:(LoginBlock)block;

+ (NSString *)timeIntervalFromLastTime:(NSString *)lastTime;
//- (NSString *)timeWithTimeIntervalString:(NSString *)timeString;

+(NSAttributedString *)attributedWithString:(NSString *)string font:(UIFont *)font lineSpace:(CGFloat)space;
+(CGFloat)getSpaceLabelHeight:(NSString*)string
                     withFont:(UIFont*)font
                    withWidth:(CGFloat)width
                    lineSpace:(CGFloat)space;
@end
